package com.ophiux.cs.application.user.dto;

import com.ophiux.cs.application.core.RequestDTO;
import com.ophiux.cs.application.core.Throws.ParamException;
import com.ophiux.utils.common.StringUtil;

public class LoginRequest extends RequestDTO {
	private String USER_PWD;
	private String USER_ACC;
	private String ROLE;//1：医生   2：患者
	public String getUSER_PWD() {
		return USER_PWD;
	}
	public void setUSER_PWD(String uSER_PWD) {
		USER_PWD = uSER_PWD;
	}
	public String getUSER_ACC() {
		return USER_ACC;
	}
	public void setUSER_ACC(String uSER_ACC) {
		USER_ACC = uSER_ACC;
	}
	public String getROLE() {
		return ROLE;
	}
	public void setROLE(String rOLE) {
		ROLE = rOLE;
	}
	/**
	 * 参数可空验证
	 * @return
	 * @throws ParamException 
	 */
	public void paramVer() throws ParamException {
		if(StringUtil.isEmpty(this.USER_ACC)) {
			throw new ParamException("用户账号不可为空");
		}
		if(StringUtil.isEmpty(this.USER_PWD)) {
			throw new ParamException("用户密码不可为空");
		}
		if(StringUtil.isEmpty(this.ROLE)) {
			throw new ParamException("用户角色不可为空");
		}
	}
	@Override
	public boolean isParamValid() {
		// TODO Auto-generated method stub
		return false;
	}
	
}
